Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replacing %s with f-string #1165

Conversation

haviv1idan
Copy link

No description provided.

@haviv1idan haviv1idan force-pushed the improvment/remove_python_2.x_style branch from d43b7ba to 3d70987 Compare November 11, 2024 18:29
@haviv1idan haviv1idan force-pushed the improvment/remove_python_2.x_style branch from 3d70987 to 2b6ca84 Compare November 11, 2024 18:35
@dieser-niko dieser-niko linked an issue Nov 25, 2024 that may be closed by this pull request
@dieser-niko
Copy link
Member

dieser-niko commented Nov 25, 2024

I just noticed that I actually started to work on this already, see branch 1159-formatted-strings. This means I'm going to have to close this PR. However, I will go through your changes, maybe you added something that I might have missed.

tid = sys.argv[1]
else:
tid = 'spotify:track:4TTV7EcfroSLWzXRY6gLv6'
tid = sys.argv[1] if len(sys.argv) > 1 else 'spotify:track:4TTV7EcfroSLWzXRY6gLv6'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I won't add these changes, it makes the code a bit harder to read, considering these are just examples.

else:
spotipy.Spotify(auth_manager=SpotifyOAuth()).current_user_follow_playlist(args.playlist)

playlist = args.playlist or '37i9dQZEVXbMDoHDwVN2tF' # default is Spotify Global Top 50 playlist
Copy link
Member

@dieser-niko dieser-niko Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually needed to use a different playlist because Spotify blocks access to their own playlists now.

@dieser-niko dieser-niko mentioned this pull request Dec 3, 2024
dieser-niko added a commit that referenced this pull request Jan 14, 2025
* use newer string formatters (https://pyformat.info)

* fix typo

* went through the files again, additions from #1165 are also included

* replace .format() with f strings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

changing %s to f-string
2 participants